// 子模块moduleA路径：store/modules/moduleA.js 
export default {
  namespaced: true,
  state: {
    chatList: []
  },
  mutations: {
    addChat(state, payload) {
      state.chatList = state.chatList.filter(v => v.id !== payload.id)
      state.chatList.unshift(payload)
    },
  },
}
